﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MixScriptWeb.control;
using MixScriptWeb.Share;
using MixScript.BLL;

namespace MixScriptWeb.Jideco.MM
{
    public partial class StokPrc : cCommonWeb
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                addFindClickAttribute(this, new MixScriptTB[] { txtwrhcode }, new string[] { "SRCWRHID" });               
                ddlMonth.SelectedValue = DateTime.Now.Month.ToString();
                ddlTahun.SelectedValue = DateTime.Now.Year.ToString();
            }
        }

        protected void btnPrint_Click(object sender, EventArgs e)
        {
            Session["ddlMonth"] = ddlMonth.SelectedValue;
            Session["ddlTahun"] = ddlTahun.SelectedValue;
            Session["txtwrhcode"] = txtwrhcode.Text;

            string sscript = "";
            sscript += "<script>";           
            sscript += "window.open('../print/rptid-10,GRNID-" + "" + ",suppid-" + "" + ",dl.html', '_blank');";
            sscript += "</script>";
            ClientScript.RegisterStartupScript(GetType(), "report", sscript);        
        }
    }
}